<?php

namespace api\models;

use Yii;

/**
 * This is the model class for table "{{%user_list}}".
 *
 * @property string $unionid
 * @property string $openId
 * @property string $userid
 * @property string $email
 * @property string $department
 * @property bool $isBoss
 * @property string $order
 * @property string $dingId
 * @property bool $isLeader
 * @property string $mobile
 * @property bool $active
 * @property bool $isAdmin
 * @property string $avatar
 * @property bool $isHide
 * @property string $name
 */
class UserList extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%user_list}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['unionid', 'openId', 'userid', 'email', 'department', 'isBoss', 'order', 'dingId', 'isLeader', 'mobile', 'active', 'avatar', 'isHide', 'name'], 'required'],
            [['isBoss', 'isLeader', 'active', 'isAdmin', 'isHide'], 'boolean'],
            [['unionid', 'openId', 'userid', 'email', 'order', 'dingId', 'avatar'], 'string', 'max' => 200],
            [['department', 'name'], 'string', 'max' => 100],
            [['mobile'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'unionid' => Yii::t('app', 'Unionid'),
            'openId' => Yii::t('app', 'Open ID'),
            'userid' => Yii::t('app', 'Userid'),
            'email' => Yii::t('app', 'Email'),
            'department' => Yii::t('app', 'Department'),
            'isBoss' => Yii::t('app', 'Is Boss'),
            'order' => Yii::t('app', 'Order'),
            'dingId' => Yii::t('app', 'Ding ID'),
            'isLeader' => Yii::t('app', 'Is Leader'),
            'mobile' => Yii::t('app', 'Mobile'),
            'active' => Yii::t('app', 'Active'),
            'isAdmin' => Yii::t('app', 'Is Admin'),
            'avatar' => Yii::t('app', 'Avatar'),
            'isHide' => Yii::t('app', 'Is Hide'),
            'name' => Yii::t('app', 'Name'),
        ];
    }
}
